package models

type Good struct {
	Id          int64
	Name        string
	Price       float64
	Stocks      int
	Cid         int64         //类别
	Category    GoodsCategory `gorm:"foreignKey:Cid"`
	Bid         int64         //品牌
	Brand       Brand         `gorm:"foreignKey:Bid"`
	Description string
	Img         string
}

// 商品类别
type GoodsCategory struct {
	Id   int64
	Name string
	Pid  int64
}

type Brand struct {
	Id   int64
	Name string
}

type GoodByEs struct {
	Id     int64
	Name   string
	Price  float64
	Stocks int
	//Cid         int64
	Category string `gorm:"column:category"`
	//Bid         int64
	Brand       string `gorm:"column:brand"`
	Description string
	Img         string
}
